package com.xdb.sqlparser.dialect.oracle.ast.statement;

import com.xdb.sqlparser.ast.SQLExpr;
import com.xdb.sqlparser.ast.expr.SQLCharExpr;
import com.xdb.sqlparser.ast.statement.SQLExplainStatement;
import com.xdb.sqlparser.dialect.oracle.visitor.OracleASTVisitor;
import com.xdb.sqlparser.util.SQLUtils;
import com.xdb.sqlparser.visitor.SQLAstVisitor;
import com.xdb.util.JDBCConstants;

public class OracleExplainStatement extends SQLExplainStatement implements OracleStatement {

	private SQLCharExpr statementId;
	private SQLExpr into;

	public OracleExplainStatement() {
		super(JDBCConstants.ORACLE);
	}

	@Override
	public void accept0(OracleASTVisitor visitor) {
		if (visitor.visit(this)) {
			acceptChild(visitor, statementId);
			acceptChild(visitor, into);
			acceptChild(visitor, statement);
		}
		visitor.endVisit(this);
	}

	protected void accept0(SQLAstVisitor visitor) {
		accept0((OracleASTVisitor) visitor);
	}

	public String toString() {
		return SQLUtils.toOracleString(this);
	}

	public SQLCharExpr getStatementId() {
		return statementId;
	}

	public void setStatementId(SQLCharExpr statementId) {
		this.statementId = statementId;
	}

	public SQLExpr getInto() {
		return into;
	}

	public void setInto(SQLExpr into) {
		this.into = into;
	}

}
